package com.zjgsu.nftplatform.mapper;

import com.zjgsu.nftplatform.entity.Offer;
import com.zjgsu.nftplatform.pojo.DealInfo;
import com.zjgsu.nftplatform.pojo.DealResearch;
import com.zjgsu.nftplatform.pojo.GoodsInfo;
import com.zjgsu.nftplatform.pojo.GoodsResearch;
import org.apache.ibatis.annotations.MapKey;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

/**
 * @author ahy231
 * @date 2022/3/27 11:30
 * @description
 */
@Mapper
public interface GoodsMapper {
    @MapKey("mapKey")
    Map<Long, Map<String, Long>> selectStarCountOfWare(List<Long> wareId);

    List<GoodsInfo> selectGoods(@Param("research") GoodsResearch research);

    List<DealInfo> selectDeal(@Param("research") DealResearch research);

    BigDecimal selectMaxPriceOfAuction(Long wareId);

    @MapKey("id")
    Map<Long, Map<String, Long>> selectStarCountOfComments(List<Long> ids);

    Offer selectMaxOffer(Long id);

    @MapKey("id")
    Map<Long, Map<String, Object>> selectArtsManage(List<Long> nftIds);
}
